﻿using System.Windows.Media;
using _3DTicTacToe._3D;
using TicTacToe.Core;

namespace _3DTicTacToe
{
    static class Extensions
    {
        public static Color Invert(this Color color)
        {
            return Color.FromArgb(color.A,
                    (byte)(255 - color.R),
                    (byte)(255 - color.G),
                    (byte)(255 - color.B));
        }

        public static SolidColorBrush CreateBrush(this Color color)
        {
            return new SolidColorBrush(color);
        }

        public static Point3 GetPoint(this Turn turn)
        {
            return new Point3(turn.X1, turn.X2, turn.X3);
        }
    }
}
